using MbUnit.Framework;
using EnterpriseLibraryContrib.PostSharp4EntLib.PolicyInjection;

namespace EnterpriseLibraryContrib.PostSharp4EntLib.Test.PolicyInjection.AttributeDrivenPolicies
{
    [TestFixture]
    public class Log
    {
        [LogCallHandler]
        private void LoggedMethod()
        {
            VisualTest.WriteLine("Should be logged.");
        }

        [LogCallHandler]
        private static void StaticLoggedMethod()
        {
            VisualTest.WriteLine("Should be logged.");
        }

        [Test]
        public void TestLoggedMethod()
        {
            VisualTest.WriteSeparator();
            LoggedMethod();
            VisualTest.WriteSeparator();
        }

        [Test]
        public void TestStaticLoggedMethod()
        {
            VisualTest.WriteSeparator();
            StaticLoggedMethod();
            VisualTest.WriteSeparator();
        }
    }
}